package com.tianqu.tms.core.webservice.weichat.api.rpc.carservice;

public class CarServiceProxy implements CarService_PortType {
  private String _endpoint = null;
  private CarService_PortType carService_PortType = null;
  
  public CarServiceProxy() {
    _initCarServiceProxy();
  }
  
  public CarServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initCarServiceProxy();
  }
  
  private void _initCarServiceProxy() {
    try {
      carService_PortType = (new CarService_ServiceLocator()).getCarSoap();
      if (carService_PortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)carService_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)carService_PortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (carService_PortType != null)
      ((javax.xml.rpc.Stub)carService_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public CarService_PortType getCarService_PortType() {
    if (carService_PortType == null)
      _initCarServiceProxy();
    return carService_PortType;
  }
  
  public java.lang.Integer addCar(java.lang.String serial, java.lang.String transfer_serial, java.lang.String licensePlate, int mileage, java.lang.String vendorId, java.lang.String brandId, java.lang.String carStyleId, int color, int price, java.lang.String memberId) throws java.rmi.RemoteException{
    if (carService_PortType == null)
      _initCarServiceProxy();
    return carService_PortType.addCar(serial, transfer_serial, licensePlate, mileage, vendorId, brandId, carStyleId, color, price, memberId);
  }
  
  public java.lang.Integer changeRegisterStatus(java.lang.String serial, int registerStatus, java.lang.String memberId) throws java.rmi.RemoteException{
    if (carService_PortType == null)
      _initCarServiceProxy();
    return carService_PortType.changeRegisterStatus(serial, registerStatus, memberId);
  }
  
  public java.lang.Integer lockOrUnLockCar(java.lang.String serial, int registerStatus) throws java.rmi.RemoteException{
    if (carService_PortType == null)
      _initCarServiceProxy();
    return carService_PortType.lockOrUnLockCar(serial, registerStatus);
  }
  
  
}